package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallActivityApply;
import com.appkubes.mall.core.po.MallActivityApplyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallActivityApplyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityApplySqlProvider.class, method="countByExample")
    long countByExample(MallActivityApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallActivityApplySqlProvider.class, method="deleteByExample")
    int deleteByExample(MallActivityApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_activity_apply",
        "where apply_key = #{applyKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String applyKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_activity_apply (apply_key, app_key, ",
        "apply_no, activity_key, ",
        "customer_key, `status`, ",
        "create_time, approve_time, ",
        "ship_time, end_time)",
        "values (#{applyKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{applyNo,jdbcType=VARCHAR}, #{activityKey,jdbcType=VARCHAR}, ",
        "#{customerKey,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{approveTime,jdbcType=TIMESTAMP}, ",
        "#{shipTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP})"
    })
    int insert(MallActivityApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallActivityApplySqlProvider.class, method="insertSelective")
    int insertSelective(MallActivityApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityApplySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="apply_key", property="applyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="approve_time", property="approveTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ship_time", property="shipTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MallActivityApply> selectByExampleWithRowbounds(MallActivityApplyExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityApplySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="apply_key", property="applyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="approve_time", property="approveTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ship_time", property="shipTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MallActivityApply> selectByExample(MallActivityApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "apply_key, app_key, apply_no, activity_key, customer_key, `status`, create_time, ",
        "approve_time, ship_time, end_time",
        "from mall_activity_apply",
        "where apply_key = #{applyKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="apply_key", property="applyKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="approve_time", property="approveTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ship_time", property="shipTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP)
    })
    MallActivityApply selectByPrimaryKey(String applyKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityApplySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallActivityApply record, @Param("example") MallActivityApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityApplySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallActivityApply record, @Param("example") MallActivityApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityApplySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallActivityApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_apply
     *
     * @mbg.generated
     */
    @Update({
        "update mall_activity_apply",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "apply_no = #{applyNo,jdbcType=VARCHAR},",
          "activity_key = #{activityKey,jdbcType=VARCHAR},",
          "customer_key = #{customerKey,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "approve_time = #{approveTime,jdbcType=TIMESTAMP},",
          "ship_time = #{shipTime,jdbcType=TIMESTAMP},",
          "end_time = #{endTime,jdbcType=TIMESTAMP}",
        "where apply_key = #{applyKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallActivityApply record);
}